FROM python:3.12-slim

MAINTAINER dairoot

# 更新源
RUN sed -i "s@http://deb.debian.org@https://mirrors.cloud.tencent.com@g" /etc/apt/sources.list.d/debian.sources
RUN apt-get update && apt-get install -y git

ENV DJANGO_ENV=PRODUCTION
ENV PIP_INDEX_URL=https://mirrors.tencent.com/pypi/simple
ENV PIP_TRUSTED_HOST=mirrors.tencent.com
ENV LANG=C.UTF-8 TZ=Asia/Shanghai

WORKDIR /app

COPY ./requirements.txt .

RUN pip install -U pip && pip install -r requirements.txt

COPY . .

# RUN python manage.py collectstatic --noinput # 静态文件

